import { Component } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'isc-frame',
  templateUrl: './frame.component.html',
  styleUrls: ['./frame.component.scss']
})
export class FrameComponent {
  isCollapsed = false;
  menuIndex = 0;

  constructor(private router: Router,) { }

  toWelcome() {
    this.menuIndex = 0;
    this.router.navigate(['/welcome']);
  }
  toGoods() {
    this.menuIndex = 1;
    this.router.navigate(['/goods']);
  }
  toAddGoods() {
    this.menuIndex = 2;
    this.router.navigate(['/addGoods']);
  }
}
